package com.lsl.test;

import java.util.Objects;

/**
 * @author lishuailong
 * @create 2020-07-14 16:37
 */
@Myzj(value = "class")
public class Person extends Creature<String> implements Comparable<String> {
    private String name;
    private Integer age;


    public Person(String name, Integer age) {
        this.name = name;
        this.age = age;
    }
    @Myzj(value = "method")
    public Person() {

    }
    public void info(){
        System.out.println("我叫"+name+",我今年"+age+"岁了！");
    }
    private void show(String name,Integer age){
        System.out.println("我叫"+name+",我今年"+age+"岁了！");
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Person person = (Person) o;
        return Objects.equals(name, person.name) &&
                Objects.equals(age, person.age);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, age);
    }
    public String Introduce(){
        return "我叫"+name+",我今年"+age+"岁了！";
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    @Override
    public int compareTo(String o) {
        return 0;
    }
}
